




/*
'===============================================================================
'  MP.LayerHelper.MP_OBS.BL.HrEmployeeManagerBase
'===============================================================================
*/

using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using MP.LayerHelper.MP_OBS.BLL;
using MP.LayerHelper.MP_OBS.DAL;
using MP.LayerHelper.MP_OBS.DAL.EntityClasses;
using MP.LayerHelper.MP_OBS.DAL.FactoryClasses;
using MP.LayerHelper.MP_OBS.DAL.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;

namespace MP.LayerHelper.MP_OBS.BLL
{
	public class HrEmployeeManagerBase : ManagerBase
	{
		/// <summary>
		/// Purpose: Class constructor.
		/// </summary>
		
		public HrEmployeeManagerBase()
		{
			// Nothing for now.
		}
		
		public override string TableName()
        {
            return "HrEmployee";
        }
		
		public HrEmployeeEntity Insert(HrEmployeeEntity _HrEmployeeEntity)
		{
			return Insert(_HrEmployeeEntity, "");
		}
		
		public HrEmployeeEntity Insert(HrEmployeeEntity _HrEmployeeEntity, string controlId)
		{
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.SaveEntity(_HrEmployeeEntity, true);
				HrEmployeeFields field = new HrEmployeeFields();
                LogEntity(_HrEmployeeEntity, field, AcInsert, controlId);
			}
			return _HrEmployeeEntity;
		}

		
		public HrEmployeeEntity Insert(Guid Id, string EmployeeId, string WindowsUser, string AgentNumber, string MachineId, string FullName, string LastName, string Gender, string HomeAddress, string Email, string MobilePhone, string CreatedBy, DateTime CreatedDate, string UpdatedBy, DateTime UpdatedDate, bool IsDeleted, Guid BranchId, Guid GroupId, bool IsOfficer, bool IsFullTimeUser, double FreeDay, Guid BelongAccount)
		{
			HrEmployeeEntity _HrEmployeeEntity = new HrEmployeeEntity();
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				
				_HrEmployeeEntity.Id = Id;
				_HrEmployeeEntity.EmployeeId = EmployeeId;
				_HrEmployeeEntity.WindowsUser = WindowsUser;
				_HrEmployeeEntity.AgentNumber = AgentNumber;
				_HrEmployeeEntity.MachineId = MachineId;
				_HrEmployeeEntity.FullName = FullName;
				_HrEmployeeEntity.LastName = LastName;
				_HrEmployeeEntity.Gender = Gender;
				_HrEmployeeEntity.HomeAddress = HomeAddress;
				_HrEmployeeEntity.Email = Email;
				_HrEmployeeEntity.MobilePhone = MobilePhone;
				_HrEmployeeEntity.CreatedBy = CreatedBy;
				_HrEmployeeEntity.CreatedDate = CreatedDate;
				_HrEmployeeEntity.UpdatedBy = UpdatedBy;
				_HrEmployeeEntity.UpdatedDate = UpdatedDate;
				_HrEmployeeEntity.IsDeleted = IsDeleted;
				_HrEmployeeEntity.BranchId = BranchId;
				_HrEmployeeEntity.GroupId = GroupId;
				_HrEmployeeEntity.IsOfficer = IsOfficer;
				_HrEmployeeEntity.IsFullTimeUser = IsFullTimeUser;
				_HrEmployeeEntity.FreeDay = FreeDay;
				_HrEmployeeEntity.BelongAccount = BelongAccount;
				HrEmployeeFields field = new HrEmployeeFields();
                LogEntity(_HrEmployeeEntity, field, AcInsert);
				adapter.SaveEntity(_HrEmployeeEntity, true);
			}
			return _HrEmployeeEntity;
		}

		public HrEmployeeEntity Insert(string EmployeeId, string WindowsUser, string AgentNumber, string MachineId, string FullName, string LastName, string Gender, string HomeAddress, string Email, string MobilePhone, string CreatedBy, DateTime CreatedDate, string UpdatedBy, DateTime UpdatedDate, bool IsDeleted, Guid BranchId, Guid GroupId, bool IsOfficer, bool IsFullTimeUser, double FreeDay, Guid BelongAccount)
		{
			HrEmployeeEntity _HrEmployeeEntity = new HrEmployeeEntity();
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				
				_HrEmployeeEntity.EmployeeId = EmployeeId;
				_HrEmployeeEntity.WindowsUser = WindowsUser;
				_HrEmployeeEntity.AgentNumber = AgentNumber;
				_HrEmployeeEntity.MachineId = MachineId;
				_HrEmployeeEntity.FullName = FullName;
				_HrEmployeeEntity.LastName = LastName;
				_HrEmployeeEntity.Gender = Gender;
				_HrEmployeeEntity.HomeAddress = HomeAddress;
				_HrEmployeeEntity.Email = Email;
				_HrEmployeeEntity.MobilePhone = MobilePhone;
				_HrEmployeeEntity.CreatedBy = CreatedBy;
				_HrEmployeeEntity.CreatedDate = CreatedDate;
				_HrEmployeeEntity.UpdatedBy = UpdatedBy;
				_HrEmployeeEntity.UpdatedDate = UpdatedDate;
				_HrEmployeeEntity.IsDeleted = IsDeleted;
				_HrEmployeeEntity.BranchId = BranchId;
				_HrEmployeeEntity.GroupId = GroupId;
				_HrEmployeeEntity.IsOfficer = IsOfficer;
				_HrEmployeeEntity.IsFullTimeUser = IsFullTimeUser;
				_HrEmployeeEntity.FreeDay = FreeDay;
				_HrEmployeeEntity.BelongAccount = BelongAccount;
				adapter.SaveEntity(_HrEmployeeEntity, true);
				HrEmployeeFields field = new HrEmployeeFields();
                LogEntity(_HrEmployeeEntity, field, AcInsert);
			}
			return _HrEmployeeEntity;
		}
		
		public bool Update(HrEmployeeEntity _HrEmployeeEntity)
        {
            return Update(_HrEmployeeEntity, "");
        }

		public bool Update(HrEmployeeEntity _HrEmployeeEntity, string controlId)
		{
			bool toReturn = false;
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				RelationPredicateBucket filter = new RelationPredicateBucket();
				IPredicateExpression _PredicateExpression = new PredicateExpression();
				_PredicateExpression.Add(HrEmployeeFields.Id == _HrEmployeeEntity.Id);
					
				filter.PredicateExpression.Add(_PredicateExpression);

				adapter.UpdateEntitiesDirectly(_HrEmployeeEntity, filter);
				toReturn = true;
				
				HrEmployeeFields field = new HrEmployeeFields();
                LogEntity(_HrEmployeeEntity, field, AcUpdate, controlId);
			}
			return toReturn;
		}
		
		public bool Update(HrEmployeeEntity _HrEmployeeEntity, RelationPredicateBucket filter)
		{
			bool toReturn = false;
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.UpdateEntitiesDirectly(_HrEmployeeEntity, filter);
				toReturn = true;
				
				HrEmployeeFields field = new HrEmployeeFields();
                LogEntity(_HrEmployeeEntity, field, AcUpdate);
			}
			return toReturn;
		}

		public bool Update(Guid Id, string EmployeeId, string WindowsUser, string AgentNumber, string MachineId, string FullName, string LastName, string Gender, string HomeAddress, string Email, string MobilePhone, string CreatedBy, DateTime CreatedDate, string UpdatedBy, DateTime UpdatedDate, bool IsDeleted, Guid BranchId, Guid GroupId, bool IsOfficer, bool IsFullTimeUser, double FreeDay, Guid BelongAccount)
		{
			bool toReturn = false;
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				HrEmployeeEntity _HrEmployeeEntity = new HrEmployeeEntity(Id);
				if (adapter.FetchEntity(_HrEmployeeEntity))
				{
				
					_HrEmployeeEntity.EmployeeId = EmployeeId;
					_HrEmployeeEntity.WindowsUser = WindowsUser;
					_HrEmployeeEntity.AgentNumber = AgentNumber;
					_HrEmployeeEntity.MachineId = MachineId;
					_HrEmployeeEntity.FullName = FullName;
					_HrEmployeeEntity.LastName = LastName;
					_HrEmployeeEntity.Gender = Gender;
					_HrEmployeeEntity.HomeAddress = HomeAddress;
					_HrEmployeeEntity.Email = Email;
					_HrEmployeeEntity.MobilePhone = MobilePhone;
					_HrEmployeeEntity.CreatedBy = CreatedBy;
					_HrEmployeeEntity.CreatedDate = CreatedDate;
					_HrEmployeeEntity.UpdatedBy = UpdatedBy;
					_HrEmployeeEntity.UpdatedDate = UpdatedDate;
					_HrEmployeeEntity.IsDeleted = IsDeleted;
					_HrEmployeeEntity.BranchId = BranchId;
					_HrEmployeeEntity.GroupId = GroupId;
					_HrEmployeeEntity.IsOfficer = IsOfficer;
					_HrEmployeeEntity.IsFullTimeUser = IsFullTimeUser;
					_HrEmployeeEntity.FreeDay = FreeDay;
					_HrEmployeeEntity.BelongAccount = BelongAccount;
					adapter.SaveEntity(_HrEmployeeEntity, true);
					toReturn = true;
					
					HrEmployeeFields field = new HrEmployeeFields();
					LogEntity(_HrEmployeeEntity, field, AcUpdate);
				}
			}
			return toReturn;
		}

		public bool Delete(Guid Id)
		{
			bool toReturn = false;
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				HrEmployeeEntity _HrEmployeeEntity = new HrEmployeeEntity(Id);
				if (adapter.FetchEntity(_HrEmployeeEntity))
				{
					adapter.DeleteEntity(_HrEmployeeEntity);
					toReturn = true;
				}
			}
			return toReturn;
		}
		
		public void DeleteAll() 
		{
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.DeleteEntitiesDirectly("HrEmployeeEntity", null);
			}
		}
		
		
		public int DeleteById(Guid Id)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.Id == Id);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByEmployeeId(string EmployeeId)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.EmployeeId == EmployeeId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByWindowsUser(string WindowsUser)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.WindowsUser == WindowsUser);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByAgentNumber(string AgentNumber)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.AgentNumber == AgentNumber);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByMachineId(string MachineId)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.MachineId == MachineId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByFullName(string FullName)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.FullName == FullName);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByLastName(string LastName)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.LastName == LastName);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByGender(string Gender)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.Gender == Gender);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByHomeAddress(string HomeAddress)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.HomeAddress == HomeAddress);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByEmail(string Email)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.Email == Email);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByMobilePhone(string MobilePhone)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.MobilePhone == MobilePhone);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByCreatedBy(string CreatedBy)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.CreatedBy == CreatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByCreatedDate(DateTime CreatedDate)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.CreatedDate == CreatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByUpdatedBy(string UpdatedBy)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.UpdatedBy == UpdatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByUpdatedDate(DateTime UpdatedDate)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.UpdatedDate == UpdatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByIsDeleted(bool IsDeleted)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.IsDeleted == IsDeleted);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByBranchId(Guid BranchId)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.BranchId == BranchId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByGroupId(Guid GroupId)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.GroupId == GroupId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByIsOfficer(bool IsOfficer)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.IsOfficer == IsOfficer);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByIsFullTimeUser(bool IsFullTimeUser)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.IsFullTimeUser == IsFullTimeUser);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByFreeDay(double FreeDay)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.FreeDay == FreeDay);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		
		public int DeleteByBelongAccount(Guid BelongAccount)
		{
			int toReturn = 0;
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.BelongAccount == BelongAccount);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				toReturn = adapter.DeleteEntitiesDirectly("HrEmployeeEntity", filter);
			}
			return toReturn;
		}
		

		
		public HrEmployeeEntity SelectOne(Guid Id)
		{
			HrEmployeeEntity toReturn = null;
			using(DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				HrEmployeeEntity _HrEmployeeEntity = new HrEmployeeEntity(Id);
				if (adapter.FetchEntity(_HrEmployeeEntity))
				{
					toReturn = _HrEmployeeEntity;
				}
			}
			return toReturn;
		}

		// Return DataTable
		public DataTable SelectAllRDT()
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, null, true);
			}
			return toReturn;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectAllLST()
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, null, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectAllLST_Paged(int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, null, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByIdLST(Guid Id)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.Id == Id);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByIdLST_Paged(Guid Id, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.Id == Id);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByIdRDT(Guid Id)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.Id == Id);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByIdRDT_Paged(Guid Id, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.Id == Id);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByEmployeeIdLST(string EmployeeId)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.EmployeeId == EmployeeId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByEmployeeIdLST_Paged(string EmployeeId, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.EmployeeId == EmployeeId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByEmployeeIdRDT(string EmployeeId)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.EmployeeId == EmployeeId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByEmployeeIdRDT_Paged(string EmployeeId, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.EmployeeId == EmployeeId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByWindowsUserLST(string WindowsUser)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.WindowsUser == WindowsUser);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByWindowsUserLST_Paged(string WindowsUser, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.WindowsUser == WindowsUser);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByWindowsUserRDT(string WindowsUser)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.WindowsUser == WindowsUser);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByWindowsUserRDT_Paged(string WindowsUser, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.WindowsUser == WindowsUser);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByAgentNumberLST(string AgentNumber)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.AgentNumber == AgentNumber);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByAgentNumberLST_Paged(string AgentNumber, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.AgentNumber == AgentNumber);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByAgentNumberRDT(string AgentNumber)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.AgentNumber == AgentNumber);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByAgentNumberRDT_Paged(string AgentNumber, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.AgentNumber == AgentNumber);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByMachineIdLST(string MachineId)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.MachineId == MachineId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByMachineIdLST_Paged(string MachineId, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.MachineId == MachineId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByMachineIdRDT(string MachineId)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.MachineId == MachineId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByMachineIdRDT_Paged(string MachineId, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.MachineId == MachineId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByFullNameLST(string FullName)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.FullName == FullName);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByFullNameLST_Paged(string FullName, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.FullName == FullName);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByFullNameRDT(string FullName)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.FullName == FullName);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByFullNameRDT_Paged(string FullName, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.FullName == FullName);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByLastNameLST(string LastName)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.LastName == LastName);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByLastNameLST_Paged(string LastName, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.LastName == LastName);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByLastNameRDT(string LastName)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.LastName == LastName);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByLastNameRDT_Paged(string LastName, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.LastName == LastName);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByGenderLST(string Gender)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.Gender == Gender);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByGenderLST_Paged(string Gender, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.Gender == Gender);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByGenderRDT(string Gender)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.Gender == Gender);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByGenderRDT_Paged(string Gender, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.Gender == Gender);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByHomeAddressLST(string HomeAddress)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.HomeAddress == HomeAddress);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByHomeAddressLST_Paged(string HomeAddress, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.HomeAddress == HomeAddress);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByHomeAddressRDT(string HomeAddress)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.HomeAddress == HomeAddress);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByHomeAddressRDT_Paged(string HomeAddress, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.HomeAddress == HomeAddress);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByEmailLST(string Email)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.Email == Email);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByEmailLST_Paged(string Email, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.Email == Email);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByEmailRDT(string Email)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.Email == Email);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByEmailRDT_Paged(string Email, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.Email == Email);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByMobilePhoneLST(string MobilePhone)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.MobilePhone == MobilePhone);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByMobilePhoneLST_Paged(string MobilePhone, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.MobilePhone == MobilePhone);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByMobilePhoneRDT(string MobilePhone)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.MobilePhone == MobilePhone);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByMobilePhoneRDT_Paged(string MobilePhone, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.MobilePhone == MobilePhone);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByCreatedByLST(string CreatedBy)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.CreatedBy == CreatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByCreatedByLST_Paged(string CreatedBy, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.CreatedBy == CreatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByCreatedByRDT(string CreatedBy)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.CreatedBy == CreatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByCreatedByRDT_Paged(string CreatedBy, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.CreatedBy == CreatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByCreatedDateLST(DateTime CreatedDate)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.CreatedDate == CreatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByCreatedDateLST_Paged(DateTime CreatedDate, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.CreatedDate == CreatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByCreatedDateRDT(DateTime CreatedDate)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.CreatedDate == CreatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByCreatedDateRDT_Paged(DateTime CreatedDate, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.CreatedDate == CreatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByUpdatedByLST(string UpdatedBy)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.UpdatedBy == UpdatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByUpdatedByLST_Paged(string UpdatedBy, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.UpdatedBy == UpdatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByUpdatedByRDT(string UpdatedBy)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.UpdatedBy == UpdatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByUpdatedByRDT_Paged(string UpdatedBy, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.UpdatedBy == UpdatedBy);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByUpdatedDateLST(DateTime UpdatedDate)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.UpdatedDate == UpdatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByUpdatedDateLST_Paged(DateTime UpdatedDate, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.UpdatedDate == UpdatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByUpdatedDateRDT(DateTime UpdatedDate)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.UpdatedDate == UpdatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByUpdatedDateRDT_Paged(DateTime UpdatedDate, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.UpdatedDate == UpdatedDate);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByIsDeletedLST(bool IsDeleted)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.IsDeleted == IsDeleted);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByIsDeletedLST_Paged(bool IsDeleted, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.IsDeleted == IsDeleted);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByIsDeletedRDT(bool IsDeleted)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.IsDeleted == IsDeleted);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByIsDeletedRDT_Paged(bool IsDeleted, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.IsDeleted == IsDeleted);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByBranchIdLST(Guid BranchId)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.BranchId == BranchId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByBranchIdLST_Paged(Guid BranchId, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.BranchId == BranchId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByBranchIdRDT(Guid BranchId)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.BranchId == BranchId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByBranchIdRDT_Paged(Guid BranchId, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.BranchId == BranchId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByGroupIdLST(Guid GroupId)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.GroupId == GroupId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByGroupIdLST_Paged(Guid GroupId, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.GroupId == GroupId);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByGroupIdRDT(Guid GroupId)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.GroupId == GroupId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByGroupIdRDT_Paged(Guid GroupId, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.GroupId == GroupId);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByIsOfficerLST(bool IsOfficer)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.IsOfficer == IsOfficer);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByIsOfficerLST_Paged(bool IsOfficer, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.IsOfficer == IsOfficer);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByIsOfficerRDT(bool IsOfficer)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.IsOfficer == IsOfficer);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByIsOfficerRDT_Paged(bool IsOfficer, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.IsOfficer == IsOfficer);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByIsFullTimeUserLST(bool IsFullTimeUser)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.IsFullTimeUser == IsFullTimeUser);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByIsFullTimeUserLST_Paged(bool IsFullTimeUser, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.IsFullTimeUser == IsFullTimeUser);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByIsFullTimeUserRDT(bool IsFullTimeUser)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.IsFullTimeUser == IsFullTimeUser);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByIsFullTimeUserRDT_Paged(bool IsFullTimeUser, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.IsFullTimeUser == IsFullTimeUser);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByFreeDayLST(double FreeDay)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.FreeDay == FreeDay);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByFreeDayLST_Paged(double FreeDay, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.FreeDay == FreeDay);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByFreeDayRDT(double FreeDay)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.FreeDay == FreeDay);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByFreeDayRDT_Paged(double FreeDay, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.FreeDay == FreeDay);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByBelongAccountLST(Guid BelongAccount)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.BelongAccount == BelongAccount);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null);
			}
			return _HrEmployeeCollection;
		}
		
		// Return EntityCollection<HrEmployeeEntity>
		public EntityCollection<HrEmployeeEntity> SelectByBelongAccountLST_Paged(Guid BelongAccount, int PageNumber, int PageSize)
		{
			EntityCollection<HrEmployeeEntity> _HrEmployeeCollection = new EntityCollection<HrEmployeeEntity>();
			RelationPredicateBucket filter = new RelationPredicateBucket();

			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.BelongAccount == BelongAccount);
			filter.PredicateExpression.Add(_PredicateExpression);
			
			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchEntityCollection(_HrEmployeeCollection, filter, 0, null, null, PageNumber, PageSize);
			}
			return _HrEmployeeCollection;
		}
		
		// Return DataTable
		public DataTable SelectByBelongAccountRDT(Guid BelongAccount)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.BelongAccount == BelongAccount);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, true);
			}
			return toReturn;
		}
		
		// Return DataTable
		public DataTable SelectByBelongAccountRDT_Paged(Guid BelongAccount, int PageNumber, int PageSize)
		{
			DataTable toReturn = new DataTable();
			EntityCollection _HrEmployeeCollection = new EntityCollection(new HrEmployeeEntityFactory());
			RelationPredicateBucket filter = new RelationPredicateBucket();
			
			IPredicateExpression _PredicateExpression = new PredicateExpression();
			_PredicateExpression.Add(HrEmployeeFields.BelongAccount == BelongAccount);
			filter.PredicateExpression.Add(_PredicateExpression);

			using (DataAccessAdapterBase adapter = (new DataAccessAdapterFactory()).CreateAdapter())
			{
				adapter.FetchTypedList(_HrEmployeeCollection.EntityFactoryToUse.CreateFields(), toReturn, filter, 0, null, true, null, PageNumber, PageSize);
			}
			return toReturn;
		}


		
		

	}
}
